<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
	<HEAD>
		<BASE HREF="<%=basePath%>">
		<TITLE>添加培训班类型</TITLE>
		<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
		<LINK HREF="admin/theme/eduMS.css" REL="stylesheet" TYPE="text/css">
		<style type="text/css">
select.w {
	width: 100px;
}
</style>
		<SCRIPT TYPE="text/javascript" SRC="admin/js/calendar.js"></SCRIPT>
		<SCRIPT TYPE="text/javascript" SRC="admin/js/optionMove.js"></SCRIPT>
		<script type="text/javascript">
function selectAllCourse(fm) {
	var allOption = fm.courses.options;
	for ( var i = 0; i < allOption.length; i++) {
		allOption[i].selected = true;
	}
}
</script>
	</HEAD>
	<BODY>
		<CENTER>
			<FORM ACTION="admin/classType" METHOD="post"
				onsubmit="selectAllCourse(this)">
				<input type="hidden" name="method" value="add" />
				<TABLE CLASS="tableEdit" BORDER="0" CELLSPACING="1" CELLPADDING="0">
					<TBODY>
						<TR>
							<!-- 这里是添加、编辑界面的标题 -->
							<TD ALIGN="center" CLASS="tdEditTitle">
								添加培训班类型
							</TD>
						</TR>
						<TR>
							<TD>
								<!-- 主输入域开始 -->
								<TABLE CLASS="tableEdit" CELLSPACING="0" BORDER="0"
									CELLPADDING="0">
									<TR>
										<TD CLASS="tdEditLabel">
											班级类型名称:
										</TD>
										<TD CLASS="tdEditContent">
											<INPUT TYPE="text" NAME="cName" />
										</TD>
									</TR>
									<TR>
										<TD CLASS="tdEditLabel">
											确定课程：
										</TD>
										<TD CLASS="tdEditContent">

											<TABLE BORDER="1" CELLSPACING="0" CELLPADDING="0">
												<TR>
													<TD ROWSPAN="4">
														<SELECT ID="left" CLASS="w" SIZE="13" MULTIPLE="multiple">
															<c:forEach var="c" items="${courses}">
																<OPTION VALUE="${c.cono}">
																	${c.coname}
																</OPTION>
															</c:forEach>
														</SELECT>
													</TD>
													<TD>
														<INPUT TYPE="button" VALUE="--&gt;"
															onclick="selectedToAnother('left','right');" />
													</TD>
													<TD ROWSPAN="4">
														<SELECT ID="right" name="courses" CLASS="w" SIZE="13"
															MULTIPLE="multiple">
														</SELECT>
													</TD>
												</TR>
												<TR>
													<TD>
														<INPUT TYPE="button" VALUE="&lt;--"
															onclick="selectedToAnother('right','left');" />
													</TD>
												</TR>
												<TR>
													<TD>
														<INPUT TYPE="button"
															ONCLICK="allToAnother(document.getElementById('left'),document.getElementById('right'))"
															VALUE="&gt;&gt;&gt;" />
													</TD>
												</TR>
												<TR>
													<TD>
														<INPUT TYPE="button"
															ONCLICK="allToAnother(document.getElementById('right'),document.getElementById('left'))"
															VALUE="&lt;&lt;&lt;" />
													</TD>
												</TR>
											</TABLE>

										</TD>
									</TR>
									<TR>
										<TD CLASS="tdEditLabel">
											班级类型简介:
										</TD>
										<TD CLASS="tdEditContent">
											<textarea rows="4" cols="28"></textarea>
										</TD>
									</TR>
								</TABLE>
								<!-- 主输入域结束 -->
							</TD>
						</TR>
					</TBODY>
				</TABLE>
				<TABLE>
					<TR ALIGN="center">
						<TD COLSPAN="3" BGCOLOR="#EFF3F7">
							<INPUT TYPE="submit" CLASS="MyButton" VALUE="创建班级类型" />
							<INPUT TYPE="reset" />
						</TD>
					</TR>
				</TABLE>
			</FORM>
		</CENTER>
	</BODY>
</HTML>

